<template>
  <div></div>
</template>

<script>
// import chart from './charts/template'
import Modal from 'ant-design-vue/es/modal'
export default {
  data() {
    return {
      data: {}
    }
  },
  components: {},
  activated() {
    let path = this.$route.path
    let _paramsString
    let _paramsDetail = []
    var params = {}
    if (path.indexOf('?') > -1) {
      // try {
      _paramsString = path.split('?')[1]
      if (_paramsString.indexOf('&') > -1) {
        _paramsDetail = _paramsString.split('&')
      }
      if (_paramsDetail.length > 0) {
        _paramsDetail.forEach((item, index) => {
          params[item.split('=')[0]] = item.split('=')[1]
        })
        this.$router.push({ path: '/analysis/chart', query: params })
      }
      // } catch (error) {
      //   this.$error({
      //     title: 'url格式出错!',
      //     content: error
      //   })
      // }
    } else {
      // this.$error({
      //   title: 'url无参数!',
      //   content: 'error'
      // })
    }
  },
  created() {
    let path = this.$route.path
    let _paramsString
    let _paramsDetail = []
    var params = {}
    if (path.indexOf('?') > -1) {
      // try {
      _paramsString = path.split('?')[1]
      if (_paramsString.indexOf('&') > -1) {
        _paramsDetail = _paramsString.split('&')
      }
      if (_paramsDetail.length > 0) {
        _paramsDetail.forEach((item, index) => {
          params[item.split('=')[0]] = item.split('=')[1]
        })
        this.$router.push({ path: '/analysis/chart', query: params })
      }
      // } catch (error) {
      //   this.$error({
      //     title: 'url格式出错!',
      //     content: error
      //   })
      // }
    } else {
      this.$error({
        title: 'url无参数!',
        content: 'error'
      })
    }
  }
}
</script>

<style scoped lang="stylus"></style>
